/*
 * Copyright (c) 2016 zhangcm. All Rights Reserved.
 */
package com.jnzc.ocr.dependencies.rest.base;

import com.jnzc.ocr.common.cache.UserCacheManage;
import com.jnzc.ocr.common.vo.UserVo;
import org.springframework.beans.factory.annotation.Autowired;

import javax.servlet.http.HttpServletRequest;

/**
 * @author zhangcm
 * @version 1.0, 2017/8/27
 */
public class BaseController {

    @Autowired
    private UserCacheManage userCacheManage;

    @Autowired
    private HttpServletRequest request;

    public String create(UserVo user){
        return userCacheManage.create(request, user);
    }

    public UserVo get(){
        return userCacheManage.get(request);
    }

    public void clear(){
        userCacheManage.clear(request);
    }
}
